package com.pig.goods.controller;

import com.pig.goods.service.CategoryService;
import com.pig.pojo.commgoods.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/cate/")
public class CategoryController {
    @Autowired
    private CategoryService categoryService;

    @RequestMapping("/doFindAllCategory")
    public JsonResult doFindAllCategory() {
        return new JsonResult(categoryService.findAllCategory());
    }
}
